import {createRouter, createWebHashHistory} from 'vue-router'

const routes = [
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/login.vue')
    },
    {
        path: '/home',
        // name: 'index',
        component: () => import('../views/home.vue'),
        meta:{
            needLogin: false
        },
        children: [
            {
                path: '/index',
                name: 'index',
                component: () => import('../views/index/index.vue'),
                meta:{
                    needLogin: false
                },

            },
            {
                path: '/userList',
                name: 'userList',
                component: () => import('../views/accessManagement/userManagement/index.vue'),
                meta:{
                    needLogin: false
                },
            },
            {
                path: '/depart',
                name: 'depart',
                component: () => import('../views/accessManagement/departManagement/index.vue'),
                meta:{
                    needLogin: false
                },
            },
            {
                path: '/roleAndPermission',
                name: 'roleAndPermission',
                component: () => import('../views/accessManagement/roleAndPermission/index.vue'),
                meta:{
                    needLogin: false
                },
            }
        ]
    },

]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router